﻿using AdvancedCollections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdvancedCollectionsPerformanceTests
{
    public class BinaryTreePerformanceTest : TreeBasePerformanceTest
    {
        private BinaryTree<int> _binaryTree;

        public BinaryTreePerformanceTest(string name)
            : base(name)
        {
        }

        protected override void CreateNewInstance()
        {
            _binaryTree = new BinaryTree<int>();
        }

        protected override void ImplementedAdd(int item)
        {
            _binaryTree.Add(item);
        }

        protected override void ImplementedCheckRandomContains(int item)
        {
            _binaryTree.Contains(item);
        }

        protected override void ImplementedRemove(int item)
        {
            _binaryTree.Remove(item);
        }
    }
}